<!DOCTYPE html>
<html>
<head lang="en">
	<meta charset="UTF-8">
	<title>基于iframe的文件异步上传</title>
	<link rel="stylesheet" type="text/css" href="JUpload/css/upload.css" />
</head>

<body style="background: #424f63">

	<div style="padding:100px;">
		<button id="upload-btn" style="padding: 10px 20px;">上传图片1</button>
		<div id="image-box">

		</div>

		<div style="padding-top: 30px;;">
			<input type="text" style="padding: 10px; width: 250px;" id="img-src">
			<button id="upload-btn2" style="padding: 8px 20px;">上传图片2</button>
		</div>
	</div>

	<script src="TUpload/jquery.js"></script>
	<script src="JUpload/JUpload.js"></script>

	<script>

		$("#upload-btn").JUpload({
			url : "upload.php",
			src : "src",
			image_container : "image-box"
		});

		$("#upload-btn2").JUpload({
			url : "upload.php",
			src : "src",
			callback : function(data) {
				$("#img-src").val(data.message);
			}
		});

	</script>

</body>
</html>